#!/bin/bash

read -p "input dirName:" dirname
if [ -z "$dirname" ];then
  echo "dirname not null"
elif [ ! -d "$dirname" ];then
  echo "$dirname is not exit"
else
  read -p "scale size:" size
  dir=$(ls $dirname)
  sips -Z $size $dirname/*.png 
fi
